import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    
    {
      path: '/',
      name: 'MainPage',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/MainFrame/MainPage.vue'),
      children: [
        {
          path: '/',
          name: 'Home',
          component: () => import('../components/ViewPage/Home.vue')
        },
        {
          path: '/main/AgentSetting',
          name: 'AgentSetting',
          component: () => import('../components/ViewPage/AgentSetting.vue')
        },
        {
          path: '/main/DataAnalyse',
          name: 'DataAnalyse',
          component: () => import('../components/ViewPage/DataAnalyse.vue')
        },
        {
          path: '/main/AboutUs',
          name: 'AboutUs',
          component: () => import('../components/ViewPage/AboutUs.vue')
        },
        {
          path: '/main/MemberCenter',
          name: 'MemberCenter',
          component: () => import('../components/ViewPage/MemberCenter.vue')
        },
        
      ]
    }
  ]
})

export default router
